package com.jinzhi.jzweb.controller;



import com.jinzhi.jzweb.domain.JazInterviewDO;
import com.jinzhi.jzweb.domain.param.ReceiveOrderQuery;
import io.swagger.annotations.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import com.baomidou.mybatisplus.plugins.Page;
import com.jinzhi.common.base.BaseController;
import com.jinzhi.jzweb.domain.JazOrderTakingDO;
import com.jinzhi.jzweb.service.JazOrderTakingService;
import com.jinzhi.common.utils.Result;

/**
 * 
 * <pre>
 * 后台需求和面试邀约中间表
 * </pre>
 * <small> 2024-08-01 15:19:16 | Long</small>
 */
@Controller
@RequestMapping("/jzweb/jazOrderTaking")
public class JazOrderTakingController extends BaseController {
	@Autowired
	private JazOrderTakingService jazOrderTakingService;
	
	@GetMapping()
	@RequiresPermissions("jzweb:jazOrderTaking:jazOrderTaking")
	String JazOrderTaking(){
	    return "jzweb/jazOrderTaking/jazOrderTaking";
	}
	
	@ResponseBody
	@PostMapping("/list")
	//@RequiresPermissions("jzweb:jazOrderTaking:jazOrderTaking")
	public Result<Page<JazOrderTakingDO>> list(@RequestBody ReceiveOrderQuery receiveOrderQuery){
        return Result.ok(jazOrderTakingService.getReceiverOrderList(receiveOrderQuery));
	}

	@ApiOperation(value = "根据id查询详细信息", notes = "根据id查询详细信息")
	@ApiImplicitParams({
			@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long"),
	})
	@ApiResponses({@ApiResponse(code = 0, message = "操作成功"),
			@ApiResponse(code = 500, message = "服务器内部异常")})
	@ResponseBody
	@GetMapping(value = "/getReceiverOrderById")
	public Result<JazOrderTakingDO> getUserAuntById(@RequestParam("id") Long id){
		return Result.ok(jazOrderTakingService.getReceiverOrderById(id));
	}
	
	@GetMapping("/add")
	@RequiresPermissions("jzweb:jazOrderTaking:add")
	String add(){
	    return "jzweb/jazOrderTaking/add";
	}
	
}
